<template>
	<view class="designRecom">
		<navBar isBack backColor="#333" title="设计师推荐" color="#333" background="#fff"></navBar>
		<!-- 设计师列表 -->
		<view class="designList">
			<view class="item" v-for="(item,index) in designList" :key="index" @click="toDesignDetail(item.id)">
				<view class="topInfo">
					<view class="img">
						<image :src="item.avatar.path" mode=""></image>
					</view>
					<view class="itemCont">
						<view class="titName">
							{{item.title}}
							<span>{{item.start_offer}}-{{item.end_offer}} 元/m²</span>
						</view>
						<p>从业 {{item.employ_year}}年 | 方案 {{item.case_num}}</p>
						<view class="titTag">
							<span v-for="(items,indexs) in design_style" :key="indexs">{{items.name}}</span>
						</view>
						<view class="imgBox">
							<image  :src="item.back_thumb_url.path" mode=""></image>
							<!-- <image :src="`${baseImg}/static/common/swiper-3.jpg`" mode=""></image>
							<image :src="`${baseImg}/static/common/swiper-1.jpg`" mode=""></image> -->
						</view>
						<view class="getStar">
							<!-- <image :src="`${baseImg}/static/common/icon_stars2.png`" mode=""></image> -->
							{{item.user_fans_num}}粉丝
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import service_oneN from '@/service/oneN.js'
	export default{
		data(){
			return{
				baseImg:'http://manager.ryz1620.com',
				estate_id:'',
				designList:[]
			}
		},
		onLoad(options) {
			this.$utils.getUrl()
			this.estate_id = options.estate_id
			this.getDesignList()
		},
		methods:{
			
			getDesignList(){
				service_oneN.getDesign({estate_id: this.estate_id}).then(res => {
					// console.log(res, '设计师推荐')
					if (res.code == 1) {
						this.designList = res.data ? res.data : []
					}
				})
			},
			// 跳转到设计师详情
			toDesignDetail(id) {
				uni.navigateTo({
					url: '/pages_design/pages/design/personal/personal?designerId=' + id
				})
			},
		}
	}
</script>

<style lang="scss">
	page{height: 100%;}
	
	.designRecom{
		height: 100%;
		background-color: #fff;
		padding: 0 32rpx;
		.designList{
			.item{
				padding: 40rpx 0;
				border-bottom: 2rpx solid #F4F4F4;
				.topInfo{
					display: flex;
					.img{
						width: 90rpx;height: 90rpx;border-radius: 50%;
						margin-right: 20rpx;
						image{width: 90rpx;height: 90rpx;border-radius: 50%;}
					}
					.itemCont{
						display: flex;
						flex-direction: column;
						.titName{
							width: 580rpx;
							display: flex;
							justify-content: space-between;
							align-items: center;
							font: 600 28rpx/48rpx PingFang SC;
							color: #333;
						}
						p{
							font: 400 24rpx/44rpx PingFang SC;
							color: #939393;
						}
						.titTag{
							margin-top: 16rpx;
							display: flex;
							align-items: center;
							    flex-wrap: wrap;
							span{
								padding: 4rpx 20rpx;
								background-color: #F9F6F3;
								color: #A98F68;
								margin-right: 8rpx;
								margin-bottom: 8rpx;
								border-radius: 18rpx;
								font: 400 20rpx/36rpx PingFang SC;
							}
						}
						.imgBox{
							display: flex;
							align-items: center;
							margin: 28rpx 0 14rpx 0;
							image{width: 188rpx;margin-right: 4rpx; height: 188rpx;border-radius: 4rpx;}
						}
						.getStar{
							display: flex;
							align-items: center;
							image{margin-right: 8rpx; width: 30rpx;height: 30rpx;}
							justify-content: flex-end;
							font: 400 24rpx/46rpx PingFang SC;
							color: #939393;
						}
					}
				}
			}
		}
	}
</style>
